package entity.fields.properties;

import controllers.FieldController;
import dto.PropertyField;

public class Brewery extends PropertyField {
	
	private static final int baseRent = 100;
	
	public Brewery(String name, int price, FieldController fieldController) {
		super(fieldController, name, price);
	}

	@Override
	public int getRent() {
		int numberOfBreweries = this.getOwner().getAccount().getNumberOfFields(Brewery.class);
	
		return baseRent * numberOfBreweries;
	}

	@Override
	public String toString() {
		if(getOwner() == null)
			return "Pris: "+getPrice();
		else
			return "Leje: "+getRent();
	}

	@Override
	public String getDescription() {
		return "Betal 100 gange terningernes øjne, hvis begge bryggerier ejes, betal 200";
	}

	@Override
	public void reset() {}
}